//
//  LoginService.m
//  CreditHub
//
//  Created by xinhualong on 2024/9/14.
//

#import "LoginService.h"

@implementation LoginService
+ (void)requestLogin:(NSDictionary *)params 
             success:(SuccessBlock)successBlock
             failure:(FailureBlock)failereBlock{
    
    [BaseService requestForHttpPost:@"/proud/ofexcitement" parameters:params success:^(NSURLSessionDataTask *task, id response) {
        if (successBlock) {
            successBlock(task,response);
        }
    } failure:^(NSURLSessionDataTask *task, NSError *error) {
        if (failereBlock) {
            failereBlock(task,error);
        }
    }];
}
+ (void)requestSendCode:(NSDictionary *)params
             success:(SuccessBlock)successBlock
             failure:(FailureBlock)failereBlock{
    
    [BaseService requestForHttpPost:@"/proud/slept" parameters:params success:^(NSURLSessionDataTask *task, id response) {
        if (successBlock) {
            successBlock(task,response);
        }
    } failure:^(NSURLSessionDataTask *task, NSError *error) {
        if (failereBlock) {
            failereBlock(task,error);
        }
    }];
}
+ (void)requestSendVoiceCode:(NSDictionary *)params
             success:(SuccessBlock)successBlock
             failure:(FailureBlock)failereBlock{
    
    [BaseService requestForHttpPost:@"/proud/hadn" parameters:params success:^(NSURLSessionDataTask *task, id response) {
        if (successBlock) {
            successBlock(task,response);
        }
    } failure:^(NSURLSessionDataTask *task, NSError *error) {
        if (failereBlock) {
            failereBlock(task,error);
        }
    }];
}
@end
